home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
program
/
qlib205.zip
/
QLIB.ZIP
/
TEST
/
VIGOR.ASM
< prev
next >
Wrap
Assembly Source File
|
1997-07-02
|
2KB
|
116 lines
;Vigourous TEST v1.01
include qlib.inc
include stdio.inc
include conio.inc
include alloc.inc
.code
align 4
r1 REAL10 1.1
asiz equ 10000
h1 dd ?
h2 dd ?
h3 dd ?
h4 dd ?
dma1 dma_s <>
dma2 dma_s <>
cnt dd 0
main proc
callp clrscr
callp printf,"Vigorous Test v1.01"
xor ebx,ebx
@@:
callp gotoxy,1,3
callp printf,"Count=%i",cnt
inc cnt
callp malloc,asiz
mov h1,eax
.if eax==NULL
mov edx,"malloc()"
jmp failed
.endif
callp calloc,asiz,1
mov h2,eax
.if eax==ERROR
mov edx,"calloc()"
jmp failed
.endif
callp lock_ram,h2,asiz
.if eax==ERROR
mov edx,"lock_ram(2)"
jmp failed
.endif
callp lock_ram,h1,asiz
.if eax==ERROR
mov edx,"lock_ram(1)"
jmp failed
.endif
mov dma1.siz,4*1024
mov dma1.dmach,1
callp dma_alloc64,offset dma1
.if eax==ERROR
mov edx,"dma_alloc64()"
jmp failed
.endif
mov dma2.siz,4*1024
mov dma2.dmach,1
callp dma_alloc128,offset dma2
.if eax==ERROR
mov edx,"dma_alloc128()"
jmp failed
.endif
callp dma_free,offset dma2
callp dma_free,offset dma1
callp unlock_ram,h1,asiz
.if eax==ERROR
mov edx,"unlock_ram(1)"
jmp failed
.endif
callp unlock_ram,h2,asiz
.if eax==ERROR
mov edx,"unlock_ram(2)"
jmp failed
.endif
callp free,h1
.if eax==ERROR
mov edx,"free(1)"
jmp failed
.endif
callp free,h2
.if eax==ERROR
mov edx,"free(2)"
jmp failed
.endif
callp kbhit
cmp al,0
jz @b
call getch
ret
failed:
callp clrscr
callp printf,"Count=%i\n",cnt
callp printf,"Vigorous test failed!!!\n"
callp printf,"%s\n",edx
ret
main endp
end